package com.yanqu.road.entity.activity.pawnshop;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
@FieldTypeAnnotation(tableName = "t_c_activity_pawnshop_trigger")
public class GlobalPawnshopData extends DataObject {
    @FieldTypeAnnotation(select = true,update = true)
    private int activityId;
    @FieldTypeAnnotation(desc = "重置时间")
    private long dayTime;
    @FieldTypeAnnotation(desc = "每日体力")
    private int dayPower;
    @FieldTypeAnnotation(desc = "每日标记人数")
    public int dayMarkTimes;
    private List<CrossPawnshopTriggerData> triggerDataList = new ArrayList<>();

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if (!Objects.equals(this.activityId, activityId)) {
            this.activityId = activityId;
            setUpdateOption();
        }
    }

    public long getDayTime() {
        return dayTime;
    }

    public void setDayTime(long dayTime) {
        if (!Objects.equals(this.dayTime, dayTime)) {
            this.dayTime = dayTime;
            setUpdateOption();
        }
    }

    public int getDayPower() {
        return dayPower;
    }

    public void setDayPower(int dayPower) {
        if (!Objects.equals(this.dayPower, dayPower)) {
            this.dayPower = dayPower;
            setUpdateOption();
        }
    }

    public List<CrossPawnshopTriggerData> getTriggerDataList() {
        return triggerDataList;
    }

    public void setTriggerDataList(List<CrossPawnshopTriggerData> triggerDataList) {
        this.triggerDataList = triggerDataList;
    }

    public void addTriggerData(CrossPawnshopTriggerData data) {
        triggerDataList.add(data);
        setUpdateOption();
    }

    public int getDayMarkTimes() {
        return dayMarkTimes;
    }

    public void setDayMarkTimes(int dayMarkTimes) {
        if (!Objects.equals(this.dayMarkTimes, dayMarkTimes)) {
            this.dayMarkTimes = dayMarkTimes;
            setUpdateOption();
        }
    }
}
